import java.util.Comparator;
import java.util.PriorityQueue;
class Student implements Comparable<Student>{
    public int age;
    public Student(int age){
        this.age = age;
    }

    @Override
    public int compareTo(Student o) {
        return this.age - o.age;
    }
}
class IntCmp implements Comparator<Integer>{
    @Override
    public int compare(Integer o1, Integer o2) {
        return o1.compareTo(o2);
        //return o2.compareTo(o1);
    }
}
public class Test {

    public static void main5(String[] args) {
        MyPriorityQueue myPriorityQueue = new MyPriorityQueue();
        myPriorityQueue.createHeap2(20);
        myPriorityQueue.createHeap2(10);
        myPriorityQueue.createHeap2(5);
        // 5 20 10
        System.out.println();
    }
    public static void main4(String[] args) {
        MyPriorityQueue myPriorityQueue = new MyPriorityQueue();
        int[] arr = {65,49,34,25,37,27,19,18,15,28};
        myPriorityQueue.createTree(arr);
        myPriorityQueue.createHeap();
        myPriorityQueue.offer(2);
        myPriorityQueue.poll();
        System.out.println(myPriorityQueue.peek());
    }
    public static void main3(String[] args) {
        PriorityQueue<Integer> priorityQueue = new PriorityQueue<>(new IntCmp());
        priorityQueue.offer(20);
        priorityQueue.offer(10);
        priorityQueue.offer(30);
        System.out.println();
    }
    public static void main2(String[] args) {
        PriorityQueue<Student> priorityQueue = new PriorityQueue<>();
        priorityQueue.offer(new Student(20));
        priorityQueue.offer(new Student(10));
        priorityQueue.offer(new Student(30));
        System.out.println();
    }
    public static void main1(String[] args) {
        BigRootHeap bigRootHeap = new BigRootHeap();
        bigRootHeap.initElem(new int[]{ 27,15,19,18,28,34,65,49,25,37});
        bigRootHeap.createHeap();
        bigRootHeap.offer(96);
        bigRootHeap.poll();
        System.out.println("abc");
    }
}
